Fixes for php 5.3

+ Add PHP 5.3 to target versions in Travis CI configuration.
+ Make some code changes to plugin and unit tests, for PHP 5.3 compatibility.