Fix for a phpBB bug that occurrs in PHP >=5.4.12 for reimg