change print method to be compatible with IE