Loadlib fix for WP/Silverlight

Fixes WP/Silverlight crash because Directory.GetCurrentDirectory() is
unsupported on those platforms.