According to Gallop, "polling found that 29% of Americans identified as Democrats, 30% identified as Republican, and 39% as Independent. Additionally, polling showed that within Independents, 47% are either "Democrats or Democratic leaners" and 46% are either "Republicans or Republican leaners"
So if ALL registered Democrats and ALL Democrat-leaning Independents voted for Obama, he would have received only 47% of the vote and lost. Ergo, there were Republicans and Republican-leaning Independents who voted for Obama. So yes, Republicans elected Obama, kinda.