Fix build errors.

Some GPS stuff was removed with the APMrover2-2.46 release. This
commit fixes those issues and provides working builds again.
Fix GPS data retrieval.

Since the release of 2.46, the usual way of accessing GPS data through
the g_gps variable has been broken because of its removal. Merging this
branch will produce working builds again, although I have yet to test
whether this is a working method of getting that same GPS data.