Nicolas Madsen's scruffy winner gave Queens Park Rangers their first away victory since August as they defeated Millwall 1-0 at The Den.