Phase transition preceding magnetic long-range order in the double perovskite Ba2NaOsO6