West Ham goalkeeper Joe Hart says he was grateful to the fan who lent him a cap during the first half of their FA Cup third-round tie at Shrewsbury Town on Sunday.