Safeguard against cases where no projection and no proj4 is available

This fixes a regression introduced with #1228.