fix WmsLayer initializing exception

This fixes unhandled exception when initializing WmsLayer with URL that
points to invalid GetCapabilities XML document (fixes #4)