A joint venture has closed on a $64 million loan for its plans to convert a historic Wonder Bread factory in Hoboken into an 89-unit luxury residential building.