Fix cross-project compilation

Resolves #173 (with a workaround--only export the built .d.ts files), and fixes #175.