BUG: Fix broadcast_arrays for object dtype in numpy==1.8.x

This PR has the commits from #4343 backported to numpy 1.8.x. I would love to get this fix in to numpy 1.8.1!