As far as I know, we presently have no way of determining whether or not the NSA had knowledge of the bug.
From the CVE[1], we see that OpenSSL versions from the very start in 2012[2] were vulnerable.
1 https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-01...
2 http://www.openssl.org/source/ (Jan 3 14:41:35 2012 openssl-1.0.1-beta1.tar.gz)