Bug 824715 - Correctly calculate next page offset in custom linker; r=glandium