fix rotating image plugin for php5.5