Fix PHP 5.5+ compatibility + require PHP 5.3+
Fix string transformation to keep BC