Add support for running code from STDIN, improving compatibility

Fixes facebook/hhvm#1590