Cross-platform way of getting Unix timestamp