Fix cross-project compilation

Resolves #173 (with a workaround--only export the built .d.ts files), and fixes #175.
Merge pull request #180 from palantir/fix-crossproject-compilation

Fix cross-project compilation