Generate stubs that compile

Fixes #3.