IBM rises as profit tops estimates on mainframe sales