Fix errors for testing on Node and Istanbul