Removed dependency on PHP 5.4 function getimagesizefromstring