HHVM compatibility work.

- Use `--reportfile` with PHPMD since output to STDOUT appears to be
  broken.
- Use INF and NAN as constants rather than trying to synthesize them
  ourselves.