Enable PHP5.2 builds on Travis

Note: 5.2 doesn't have -g, so set it in the environment so the others
can pick it up.
Also, 5.2 is very picky on the extension_dir it seems, so we need to set
it, because it doesn't support relative paths from `php`