Add runtime check for dataset property

This will avoid errors on IE10 without polyfills for classList and
dataset