Heavy quark production in ultra high energy cosmic ray interactions