Support for older versions of PHP

The imagescale function only exists as of PHP version 5.5.0