Fix PHP 5.3 issues to make the files backword compatible with older PHP version