There are references to Ram, Rahim, Narayan, Allah, Parmeshwar etc. in Guru Granth Sahib. All these are synonyms of God and not refering to any particular individual of particular faith.
References are there to episodes from Ramayan, Mahabharat and other ancient texts which means that people believed in them five hundred years back also.
At the same time Guru Gobind Singh also says ' Ram Rahim Puran Kuran, Anek Kahe Mat Ek Na Maniyao'