The influence of electromagnetic environment on the performance of artificial cardiac pacemakers