PHP 5.3/4 strict compatibility fixes
Merge pull request #2 from vertex/master

php 5.3/4 compat resub