Make stat command cross-platform