In the first Thor movie Odin explains that they rescued the earth from frost giants and then settled in Asgard and stopped venturing in other realms. At the time of war, Thor was too young to go to the war. So he didn't come to Earth.
But later Erik Selvig describes Thor as a hero of Norse Mythology. As per movie, the mythology was based on Odin's visit to world. So how could anyone include Thor in the mythology and so Erik know about Thor? I mean Thor didn't come to Earth, so how could Earth's people know him and make him a hero in mythology?