allowing usage as AMD module (fixes #15)