Medarex reports narrowed loss, nearly doubled revenue for Q2