Makes all javascript examples work.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>