R: fixed a bug that made some igraph functions break if called from another package.
R: fix a namespace issue if called from another package.