Guard against crop width/height being 0

Otherwise this causes errors in IE 11.
The way this gets used is for a loading bar for instance.