Fix GitHub source links for API

In 746b404, a line was added to `doc/source/api.js` to remove `lib/` from the sidebar link; however, this causes the sidebar links not to work anymore.  I suspect there was another reason for this, so hopefully @aheckmann can tell me if this fix breaks something else. :)