Gracefully handle cases where PermGen is not available

Use PSPermGen instead