Electronic structure and magnetic properties of NaOsO3