RIM reaches settlement agreement in backdating case