Allow passing options from JS

Fixes #14