Fix incorrect test & favor Date valueOf for old IE

Fixes #666.