Fix #1: Fails on compiling .d.ts files

This PR fixes the issue #1.