Heavy quark contribution to the electromagnetic properties of the nucleon