Merge pull request #890 from Mossop/bug854465

Bug 854465: Use in-XPI modules if a preference is set. r=gozala(cherry picked from commit 3e818dd79a3b6637ff442e776da5d2d6e408bde4)