PowerShell 3.0 already implements these casting functions. Fixes #7