Secure Time Synchronization in Wireless Sensor Networks: A Maximum Consensus-based Approach