(#1830) - fix browserifiablity

don't ask me why these changes are needed, they just are, also 34k is the size