Fixed "Go to definition" not working on open file

“Go to definition” would not work the first time on OSX when the file
with definition needed to be open.  Fixed it to wait until the file is
loaded before setting the offset.
Merge pull request #9 from avitebskiy/master

Fixed "Go to definition" not working on unopen file