Test for 'auto' in calculateElementWidth

Some older browsers will return 'auto' if no margin is specified,
rather than '0px'. This will cause parseInt to throw and error and
stop execution.