Fix build with --all-static

This fixes #11