[rt] Fix warnings when building with Boehm (and -W).
[rt] Move _GNU_SOURCE definition to Makefile.
[rt] Prepare to move exception code.

We can't move this to a separate file entirely at the moment due
to a couple of MPS usages.