OpenLayers: being a little smarter about popup placement (not perfect, but a start)