(a) An agreement for the purchase by a corporation of its own shares shall be enforceable by the shareholder and the corporation to the extent such purchase is permitted at the time of purchase by section 513 (Purchase or redemption by a corporation of its own shares).
(b) The possibility that a corporation may not be able to purchase its shares under section 513 shall not be a ground for denying to either party specific performance of an agreement for the purchase by a corporation of its own shares, if at the time for performance the corporation can purchase all or part of such shares under section 513.