Optimal Portfolios with Defaultable Securities: A Firm Value Approach