Anomalous infrared absorption of granular films near the percolation threshold: A microscopic approach