Valuing firm’s financial flexibility under default risk and bankruptcy costs: a WACC based approach