Add a NAVIGATION_STARTING event
Add includes and defines for older glibc

_DEFAULT_SOURCE apparently isn't like _BSD_SOURCE, so _XOPEN_SOURCE=600
is required for some functions.
Better error information from per-site-settings