NOL posts first profit after six quarters of losses