Check for events before attaching 'ready' listener in map#addLayer.
Merge pull request #373 from gumballhead/v1

Fix for #372