Fix internal module support to work on PowerShell 2

Also fixing the TC build again