add def getimagesizefromstring for php<5.4