Remove sys-dependent cruft and define-away getopt in system headers