Fix release builds of portable and silverlight