Automatically detect PHP_VERSION and workaround stream_get_line bug

Signed-off-by: Tom Castleman <tom.castleman@b3-it.com>
Merge pull request #47 from tomcastleman/php5.3.9/10-autofix

Automatically detect PHP_VERSION and workaround stream_get_line bug