Junction box for in-wall installation