Simultaneous computation of gravity and magnetic anomalies resulting from a 2-D object