Crystal-field and magnetic properties of the distorted perovskite NdGaO3