Manufactured home light fixture junction box mountings
You could replace the box with a braced box, something line this one.

 

They're designed for the bar to slip up into the hole, and then expand to bite into the nearby structural members. Once the bar is securely in place, the box can be attached to it.