Evaluate boolean expression in a string in Javascript without eval