Control of vortex chirality in regular polygonal nanomagnets using in-plane magnetic field