Tidy require_api/require_lib

1) $t_existing_globals is never used
2) avoid using extract()
3) fix Mantis build on phpng (which currently doesn't define the globals)