Fix for typescript 0.9.7 (Issue #1472)