Build as a library rather than executable.

Fixes #3.