Astropy v0.3 compatibility. Closes #195