Ground-based astrometry with wide field imagers. V. Application to near-infrared detectors: HAWK-I@VLT/ESO