using var instead of const for < IE10 compatibility

@frissdiegurke