First test of a Micromegas TPC in a magnetic field