Fixed possible exception in MediaLibrary on Windows 8